package org.nf.shopping.controller;

import org.nf.shopping.common.vo.ResultVO;
import org.springframework.http.HttpStatus;

/**
 * @author wangl
 * @date 2024/10/11
 */
public class BaseController {

    public <T> ResultVO<T> success(T data) {
        ResultVO<T> vo = new ResultVO<>();
        vo.setCode(HttpStatus.OK.value());
        vo.setData(data);
        return vo;
    }

    public ResultVO success() {
        ResultVO vo = new ResultVO();
        vo.setCode(HttpStatus.OK.value());
        return vo;
    }
}